package com.ikunikun.mapper;

import com.ikunikun.entity.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SetmealDishMapper {
	/**
	 * 根据dishIds查询SetmealIds
	 * @param dishIds
	 * @return
	 */
	List<Long> getSetMealIdsByDishIds(List<Long> dishIds);

	/**
	 * 根据套餐id查询套餐与菜品对应信息
	 * @param setmealId
	 * @return
	 */
	List<SetmealDish> getBySetmealId(Long setmealId);

	/**
	 * 添加菜品与套餐之间的关系
	 * @param setmealDishe
	 */
	void insert(SetmealDish setmealDishe);

	@Delete("delete from sky_take_out.setmeal_dish where setmeal_id = #{setmealId}")
	void deleteBySetmealId(Long setmealId);

}
